import time
from zhoukao3_0929.po.Base.Base import Base
from selenium.webdriver.common.by import By
class Page2(Base):
    # 点击搜索框
    sousuo_loc=(By.XPATH,'//*[@id="searchForm"]/div[1]/input')
    def sousuo(self):
        self.send_keys(self.sousuo_loc,'电饭煲')

    # 点击按钮
    anniu_loc=(By.XPATH,'//*[@id="searchForm"]/div[2]/input')
    def anniu(self):
        self.click(self.anniu_loc)

    def test_sousuo(self):
        self.sousuo()
        time.sleep(2)
        self.anniu()
        time.sleep(2)